package com.ych.utils.serviceReturn;


import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * Author: Usopp.tsui
 * Date: 2020/12/5
 * Time: 15:12
 * Description:返回前端数据
 */
@Data
@ApiModel("R")
public class R<T> implements Serializable {
    private int    code;
    private String msg;
    private T      data;

    public R(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        if (null != data) {
            this.data = data;
        }
    }
}